import React from 'react'
import {withRouter} from 'react-router-dom'
import Swiper from "../../../components/Swiper/Swiper";
import swiper_src_1 from "../../../res/images/web/vote/球员评分@2x.png"
import swiper_src_2 from "../../../res/images/web/vote/最佳阵容@2x.png"
import swiper_src_3 from "../../../res/images/web/vote/我的最爱.png"
const log = console.log.bind(console)

class FavoriteVote extends React.Component {

    onItemClick = (index) => {
        const routes = [
            'player',
            'line-up',
            'forecast',
        ]
        const route = './vote-list/' + routes[index]
        this.props.history.push(route)
    }

    render() {
        return <Swiper
            data={[
                swiper_src_1,
                swiper_src_2,
                swiper_src_3,
            ]}
            onSwiperItemClick={(index) => this.onItemClick(index)}
        />
    }

}

export default withRouter(FavoriteVote)